import request from '@/utils/axios'
import loginApi from '@/url/logReg'
import { IResponseType, ILogin } from './types'

/**
 * 登录
 */

export const login = (username: string, password: string) => {
  return request<IResponseType<ILogin>>({
    url: loginApi.url,
    method: loginApi.method,
    data: {
      username,
      password,
    }
  });
};